package com.ganyu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ganyu.domain.dto.AddCategoryDto;
import com.ganyu.domain.dto.UpdateCategoryDto;
import com.ganyu.domain.entity.Category;
import com.ganyu.domain.vo.AdminCategoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * DATA: 2022/8/29
 * Author: 晨夕
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    List<AdminCategoryVo> selecPagetList(@Param("pageNum") Integer pageNum, @Param("pageSize")Integer pageSize,@Param("name") String name,@Param("status") String status);
    //查询分类
    int selectPageCount(@Param("name")String name, @Param("status")String status);
    //新增分类
    void addCategory(AddCategoryDto addCategoryDto);

    //修改分类
    void updateCagegory(UpdateCategoryDto updateCategoryDto);

    //删除分类
    void deleteCagegory(@Param("ids") Long[] ids);
    //获取分类数量
    int selectCategoryCount();

}
